#include "rrcrossinfo.h"

RRCrossInfo::RRCrossInfo()
{
    cross = RRSetVec3(0.0, 0.0, 0.0);
    norm = RRSetVec3(0.0, 0.0, 0.0);
    tosrc = RRSetVec3(0.0, 0.0, 0.0);
    color = RRSetVec4(0.0, 0.0, 0.0, 1.0);
    range.s = 0.0;
    range.t = 0.0;
}

bool RRCrossInfo::rrGetHit()
{
    return hit;
}

RRVec3 RRCrossInfo::rrGetCross()
{
    return cross;
}

RRVec3 RRCrossInfo::rrGetNorm()
{
    return norm;
}

RRVec3 RRCrossInfo::rrGetToSrc()
{
    return tosrc;
}

RRMaterial RRCrossInfo::rrGetMaterial()
{
    return material;
}

RRVec4 RRCrossInfo::rrGetColor()
{
    return color;
}

double RRCrossInfo::rrGetDistance()
{
    return range.s;
}

RRRange RRCrossInfo::rrGetRange()
{
    return range;
}

void RRCrossInfo::rrSetHit(bool arg)
{
    hit = arg;
}

void RRCrossInfo::rrSetCross(RRVec3 arg)
{
    cross = arg;
}

void RRCrossInfo::rrSetNorm(RRVec3 arg)
{
    norm = arg;
}

void RRCrossInfo::rrSetToSrc(RRVec3 arg)
{
    tosrc = arg;
}

void RRCrossInfo::rrSetMaterial(RRMaterial arg)
{
    material.rrSetMaterial(&arg);
}

void RRCrossInfo::rrSetColor(RRVec4 arg)
{
    color = arg;
}

void RRCrossInfo::rrSetRange(RRRange arg)
{
    range = arg;
}

void RRCrossInfo::rrSetCrossInfo(RRCrossInfo *arg)
{
    hit = arg->rrGetHit();
    cross = arg->rrGetCross();
    norm = arg->rrGetNorm();
    tosrc = arg->rrGetToSrc();
    material = arg->rrGetMaterial();
    color = arg->rrGetColor();
    range = arg->rrGetRange();
}
